This application relates to and incorporates herein by reference Japanese Patent Application No. 11-38504 filed on Feb. 17, 1999.
1. Field of the Invention
The present invention relates to electronic control apparatuses and methods, and particularly to an electronic control apparatus including a plurality of microcomputers capable of on-board rewriting of control programs and control data and a method of on-board rewriting.
2. Related Art
It is proposed in U.S. patent application Ser. No. 987,062 filed on Dec. 8, 1997 and now U.S. Pat. No. 6,144,887 issued Nov. 7, 2000 (JP-A-10-177504) to provide a plurality of microcomputers in an electronic control apparatus for vehicles and on-board rewrite respective control programs and control data. One such apparatus may be constructed as shown in FIG. 9.
In the above construction, a main microcomputer 51 and a sub microcomputer 52 in an electronic control unit 50 are programmed to control actuators 55 and 57, respectively. The microcomputers 51 and 52 produce respective watch-dog signals W1 and W2 while in operation, so that the main microcomputer 51 is reset by a reset signal R1 from a power circuit 53 and the sub microcomputer 52 is reset by a reset signal R2 from the main microcomputer 51. The microcomputers 51 and 52 are designed to rewrite respective programs and data in non-volatile flash memories 54 and 56 through a communication circuit 59 connected to a memory writing device 58 while being mounted on a vehicle (on-board rewriting). The output ports of both microcomputers 51 and 52 are held at high impedance by respective resistors Ra during the on-board rewriting operation so that erroneous outputs are not produced to actuators 55 and 57 until the microcomputers 51 and 52 are reset and start the execution of respective programs.
The main microcomputer 51 is designed to produce the reset signal R2 from its general-purpose output port. This construction causes the general-purpose port of the main microcomputer 51 to become high impedance, when the main microcomputer 51 is put in the rewriting operation. As a result, the flash memory 56 of the sub microcomputer 52 is disabled from being rewritten, because the sub microcomputer 52 cannot be released from the reset condition.
It is therefore an object of the present invention to provide an electronic control apparatus in which on-board rewriting of both non-volatile memories are executed without fail.
According to the present invention, an electronic control apparatus for vehicles has a main microcomputer and a sub microcomputer each of which has a non-volatile flash memory storing a vehicle control program and data. Each microcomputer is reset when an abnormality is detected, and its output ports are held at high impedance condition. When a data rewriting instruction is applied from an external writing device, the main microcomputer operates to release the sub microcomputer from the reset condition. A new control program and data transmitted from the external writing device is written into the corresponding flash memory in place of the previously stored control program and data.
Preferably, each microcomputer is applied with an identification signal indicative of a main one or sub one so that each microcomputer may determine whether it is the main microcomputer. Further, the releasing of the sub microcomputer from the, reset condition is effected after a predetermined delay period from the data rewriting instruction so that the data rewriting is effected after the microcomputers are put in a stable operation.